Ext.define('Admin.view.role.RoleAddForm', {
    extend: 'Ext.form.Panel',
    alias: 'widget.roleAddForm',
    requires: [],

    viewModel: {type: 'roleViewModel'},
    controller: 'roleViewController',
    //cls: '',

    layout: {
        type:'vbox',
        align:'stretch'
    },

    bodyPadding: 10,
    scrollable: true,

    defaults: {
        labelWidth: 60,
        labelSeparator: ''
    },

    items: [{
        xtype: 'textfield',
        fieldLabel: '角色名称',
        name:'roleName'
    }, {
        xtype: 'textfield',
        fieldLabel: '角色类型',
        name:'roleType'
    }],
    bbar: {
        overflowHandler: 'menu',
        items: ['->',{
            xtype: 'button',
            ui: 'soft-green',
            text: '提交',
            handler : 'submitEditForm'
        },{
            xtype: 'button',
            ui: 'soft-red',
            text: '取消',
            handler :function(bt){
                var win = bt.up('window');
                if (win) {
                    win.close();
                }
            }
        },'->']
    }
});